<?php

/** @var \App\Entity\UserEntity $user */

use App\BO\Product\ProductBOFactory;
use App\Entity\UserEntity;
use App\Entity\WechatUserEntity;
use App\Services\Distribution\Poster;
use App\VO\Product\MetaInfo\ProductMetaInfoFactory;

$city_id = 1;

$user = UserEntity::find(332);
/** @var \App\Entity\WechatUserEntity $userWechat */
$wechatUser = WechatUserEntity::findByOpenid('o3LR95Rtg2gAId53NRgVzaFNdL5M');

$productBO = ProductBOFactory::getByProductIdAndCityId(1, $city_id);
$productInfo = ProductMetaInfoFactory::getProductInfo($productBO);

$poster = new Poster($user);
$poster->makeProduct($city_id, $productInfo);
